<template>
    <div class="app-detail">
        <el-card class="box-card">
            <div class="container-header">
                <div class="hign-line"></div>
                <div class="header-left">
                    {{$t('inventoryManagement.baseInfo')}}
                </div>
                <el-form :model="viewModel" ref="addForm" label-width="88px">
                    <el-row :gutter="24" class="mb8">
                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.supplierBatchNo')" prop="inspectionLotMark">
                                <el-input v-model="code" size="small" style="width:15%" readonly />
                                <el-input v-model="viewModel.inspectionLotMark" clearable size="small" :placeholder="$t('public.selectPl')" @keyup.enter.native="handleQuery" style="width:85%" />
                            </el-form-item>
                        </el-col>

                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.batch')" prop="lot">
                                <el-input v-model="code" size="small" style="width:15%" readonly />
                                <el-input v-model="viewModel.lot" clearable size="small" :placeholder="$t('public.selectPl')" @keyup.enter.native="handleQuery" style="width:85%" />
                            </el-form-item>
                        </el-col>

                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.supplierNo')" prop="supplierCode">
                                <el-input v-model="viewModel.supplierCode" :placeholder="$t('public.selectPl')" clearable size="small" @keyup.enter.native="handleQuery" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.materialName')" prop="materialName">
                                <el-input v-model="viewModel.materialName" :placeholder="$t('public.selectPl')" clearable size="small" @keyup.enter.native="handleQuery" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.materialNo')" prop="materialCode">
                                <el-input v-model="viewModel.materialCode" :placeholder="$t('public.selectPl')" clearable size="small" @keyup.enter.native="handleQuery" />
                            </el-form-item>
                        </el-col>

                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.materialType')" prop="materialType">
                                <el-select v-model="viewModel.materialType" filterable :placeholder="$t('public.select_holder',{select_holder: $t('inventoryManagement.materialType')})" style="width:100%;" clearable size="small">
                                    <el-option size="mini" v-for="item in materialOptions" :key="item.id" :label="item.typeName" :value="item.id">
                                    </el-option>
                                </el-select>

                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.supplierType')" prop="supplierType">
                                <el-select v-model="queryParams.supplierType" :placeholder="$t('public.select_holder',{select_holder: $t('inventoryManagement.supplierType')})" style="width:100%;" clearable size="small">
                                    <el-option key="0" label="潜在供方" value="0" />
                                    <el-option key="1" label="合格供方" value="1" />
                                    <el-option key="2" label="冻结" value="2" />
                                </el-select>
                            </el-form-item>
                        </el-col>

                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.incomingQuantity')" prop="batchAmount">
                                <el-input v-model="viewModel.batchAmount" :placeholder="$t('public.selectPl')" clearable size="small" @keyup.enter.native="handleQuery" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item :label="$t('inventoryManagement.maturity')" prop="maturity">
                                <el-input v-model="viewModel.maturity" :placeholder="$t('public.selectPl')" clearable size="small" @keyup.enter.native="handleQuery" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="24">
                            <el-form-item :label="$t('inventoryManagement.description')" prop="description" style="width:100%">
                                <el-input type="textarea" :autosize="{ minRows: 5, maxRows: 6}" v-model="viewModel.description" maxlength="1000">
                                </el-input>
                            </el-form-item>
                        </el-col>

                    </el-row>

                </el-form>
            </div>
        </el-card>
        <el-card class="box-card">
            <div class="app-container">
                <div class="container-header">
                    <div class="hign-line"></div>
                    <div class="header-left">
                        {{$t('inventoryManagement.inspectionInfo')}}
                    </div>
                </div>
                <el-row :gutter="10" class="mb8">
                    <el-col :span="1.5">
                        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">{{$t('public.add')}}</el-button>
                    </el-col>
                </el-row>
                <div class="container-table">
                    <el-table max-height="350" border stripe v-loading="loading" :data="extraList" @selection-change="handleSelectionChange">
                        <el-table-column :label="$t('inventoryManagement.inspectionItems')" align="left" prop="inspectionItems" minWidth="160">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.projectName" filterable placeholder="请选择" @change="changeProject(scope)" size="mini">
                                    <el-option size="mini" v-for="item in projectList" :key="item.projectName" :label="item.projectName" :value="item.projectName">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.code')" align="left" prop="projectCode" minWidth="120" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-input disabled v-model="scope.row.projectCode" size="small" />
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.inspectionTypeUnit')" minWidth="130" align="left" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.unitName" filterable placeholder="请选择" size="mini">
                                    <el-option size="mini" v-for="item in unitList" :key="item.unitName" :label="item.unitName" :value="item.unitName">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inspectionManagement.aroundFrequency')" minWidth="110" align="left" prop="itemFrequency" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.itemFrequency" filterable placeholder="请选择" size="mini">
                                    <el-option size="mini" v-for="item in frequencyOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.frequencyValue')" align="left" prop="itemFrequencyValue" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.itemFrequencyValue" clearable size="small" />
                            </template>
                        </el-table-column>

                        <el-table-column :label="$t('inventoryManagement.inspectionType')" minWidth="120" align="left" prop="checkoutTypeCopy">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.checkoutTypeCopy" filterable placeholder="请选择" size="mini" @change="(e)=>changeCheckoutType(e,scope)">
                                    <el-option size="mini" v-for="(item,index) in dict.type.NYIQC_CHECK_TYPE" :key="index" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-table-column>

                        <el-table-column :label="$t('inventoryManagement.decimalPlaces')" align="left" prop="decimalPlace" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.decimalPlace" v-show="scope.row.checkoutType!='布尔型'" clearable size="small" />
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.targetValue')" align="left" prop="targetValue" minWidth="120" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.targetValue" clearable size="small" />
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.lowerValue')" align="left" prop="lowerLimit" minWidth="100" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-input v-show="scope.row.checkoutType!='布尔型'" v-model="scope.row.lowerLimit" clearable size="small" />
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.upperValue')" minWidth="100" align="center" prop="upperLimit">
                            <template slot-scope="scope">
                                <el-input v-show="scope.row.checkoutType!='布尔型'" v-model="scope.row.upperLimit" clearable size="small" />
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.samplingScheme')" align="left" prop="samplingOne" minWidth="140" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.samplingOne" @change="(e)=>changeSampling(e,scope)" filterable placeholder="请选择" size="mini">
                                    <el-option size="mini" v-for="item in samplingSchemeOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.samplingOptions')" align="left" prop="samplingOptions" minWidth="260">
                            <template slot-scope="scope">

                                <el-select v-model="scope.row.samplingTwo" filterable placeholder="请选择" size="mini" style="width:48%;margin-left:5px" v-if="scope.row.samplingOne=='GB/T2828.1-2012'||scope.row.samplingOne=='C=0'">
                                    <el-option size="mini" v-for="item in samplingLevelTypeOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                                <el-select v-model="scope.row.samplingThree" filterable placeholder="请选择" size="mini" style="width:48%" v-if="scope.row.samplingOne=='GB/T2828.1-2012'">
                                    <el-option size="mini" v-for="item in samplingLevelOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                                <el-input placeholder="百分比" min="0" style="width:90%" type="number" size="mini" v-model="scope.row.samplingTwo" v-if="scope.row.samplingOne=='百分比'">
                                </el-input>
                                <span v-if="scope.row.samplingOne=='百分比'" style="margin-left:3px">%</span>
                                <el-input-number style="width:48%" v-if="scope.row.samplingOne=='固定抽样'" size="small" v-model="scope.row.samplingTwo" controls-position="right" :min="0"></el-input-number>
                                <!-- <el-select v-model="scope.row.samplingThree" filterable size="mini" style="width:48%;margin-left:5px" v-if="scope.row.samplingOne=='固定抽样'">
                                    <el-option size="mini" v-for="item in samplingFixedTypeOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select> -->
                                <el-select v-model="scope.row.samplingThree" style="width:48%" filterable size="mini" v-if="scope.row.samplingOne=='C=0'">
                                    <el-option size="mini" v-for="(item,index) in samplingMethodCOptions" :key="index" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>

                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.testMethod')" align="left" prop="detectionOne" :minWidth="200" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.detectionOne" filterable placeholder="请选择" size="mini" :style="scope.row.detectionOne=='量具'?'width:48%;margin-right:3px;float:left':'width:100%'">
                                    <el-option size="mini" v-for="item in testMethodOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                                <measuring-tool-dialog v-show="scope.row.detectionOne=='量具'" v-model="scope.row.detectionTwo" />
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('inventoryManagement.specialCharacteristics')" align="left" prop="symbol" minWidth="110" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.symbol" filterable placeholder="请选择" size="mini">
                                    <el-option size="mini" v-for="item in specialCharacteristicsOptions" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column :label="$t('public.opera')" fixed="right" align="center" width="100">
                            <template slot-scope="scope">
                                <div class="action-wrap">
                                    <table-body-btn type="delete" @click.native="handleDelete(scope)" />
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
        </el-card>
        <div class="submit-footer">
            <el-button icon="el-icon-close" size="small" @click="closeTab" class="drawer-close">{{$t('public.close')}}</el-button>
            <el-button type="primary" @click="submitForm" icon="el-icon-check" size="small">{{$t('public.submit')}}</el-button>
        </div>
    </div>

</template>

<script>
import {getType, refreshCache,} from '@/api/basic/dict/type'
import {listProject} from '@/api/basic/project'
import {listCheckoutUnit} from '@/api/basic/checkoutUnit'
import {editExtra, getExtraInfo,} from '@/api/inventoryManagement/inspectedInventory'
import FileUploadInput from '@/components/FileUploadInput'
import MeasuringToolDialog from '@/views/components/MeasuringToolDialog'

export default {
    name: 'editAddtionallInspection',
    dicts: ['sys_normal_disable', 'NYIQC_CHECK_TYPE'],
    components: {
        FileUploadInput,
        MeasuringToolDialog,
    },
    data() {
        return {
            direction: 'rtl',
            id: this.$route.params.id,
            code: 'EW',
            addInspectionExemption: false,
            drawer: false,
            approvalOpen: false,
            viewInspectionExemption: false,
            extraList: [
                {
                    samplingOne: null,
                    samplingTwo: null,
                    samplingThree: null,
                    measuringTool: null,
                    inspectionType: '1',
                    specialCharacteristics: '0',
                    projectCode: null,
                },
            ],
            projectList: [],
            frequencyOptions: [
                {
                    value: '批',
                    label: '批',
                },
                {
                    value: '件',
                    label: '件',
                },
                {
                    value: '年',
                    label: '年',
                },
                {
                    value: '季',
                    label: '季',
                },
                {
                    value: '月',
                    label: '月',
                },
                {
                    value: '日',
                    label: '日',
                },
            ],
            samplingSchemeOptions: [
                {
                    value: 'GB/T2828.1-2012',
                    label: 'GB/T2828.1-2012',
                },
                {
                    value: '百分比',
                    label: '百分比',
                },
                {
                    value: '固定抽样',
                    label: '固定抽样',
                },
                {
                    value: 'C=0',
                    label: 'C=0',
                },
            ],
            testMethodOptions: [
                {
                    value: '目测',
                    label: '目测',
                },
                {
                    value: '量具',
                    label: '量具',
                },
                {
                    value: '验证',
                    label: '验证',
                },
                {
                    value: 'ny-iqc作业指导书',
                    label: 'ny-iqc作业指导书',
                },
                {
                    value: '核对COA',
                    label: '核对COA',
                },
            ],
            samplingLevelOptions: [
                {
                    value: 'S-1',
                    label: 'S-1',
                },
                {
                    value: 'S-2',
                    label: 'S-2',
                },
                {
                    value: 'S-3',
                    label: 'S-3',
                },
                {
                    value: 'S-4',
                    label: 'S-4',
                },
                {
                    value: 'Ⅰ',
                    label: 'Ⅰ',
                },
                {
                    value: 'Ⅱ',
                    label: 'Ⅱ',
                },
                {
                    value: 'Ⅲ',
                    label: 'Ⅲ',
                },
            ],
            samplingMethodCOptions: [
                {
                    value: '0.01',
                    label: '0.01',
                },
                {
                    value: '0.015',
                    label: '0.015',
                },
                {
                    value: '0.025',
                    label: '0.025',
                },
                {
                    value: '0.04',
                    label: '0.04',
                },
                {
                    value: '0.1',
                    label: '0.1',
                },
                {
                    value: '0.15',
                    label: '0.15',
                },
                {
                    value: '0.25',
                    label: '0.25',
                },
                {
                    value: '0.4',
                    label: '0.4',
                },
                {
                    value: '0.65',
                    label: '0.65',
                },
                {
                    value: '1',
                    label: '1',
                },
                {
                    value: '1.5',
                    label: '1.5',
                },
                {
                    value: '4',
                    label: '4',
                },
                {
                    value: '6.5',
                    label: '6.5',
                },
                {
                    value: '10',
                    label: '10',
                },
            ],
            samplingLevelTypeOptions: [
                {
                    value: '正常',
                    label: '正常',
                },
                {
                    value: '放宽',
                    label: '放宽',
                },
                {
                    value: '加严',
                    label: '加严',
                },
            ],
            samplingFixedTypeOptions: [
                {
                    value: '批',
                    label: '批',
                },
                {
                    value: '件',
                    label: '件',
                },
            ],
            specialCharacteristicsOptions: [
                {
                    value: '空',
                    label: '空',
                },
                {
                    value: 'CC',
                    label: 'CC',
                },
                {
                    value: 'SC',
                    label: 'SC',
                },
            ],
            addModel: {},
            viewModel: {},
            editModel: {},
            approvalForm: {
                status: '1',
                textarea: '',
            },
            unitList: [],
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                noticeTitle: undefined,
                noticeType: undefined,
                hasRead: undefined,
                createTime: undefined,
            },
            // 表单参数
            form: {},
            materialOptions: [],
            // 表单校验
            rules: {
                materialName: [
                    {
                        required: true,
                        message: this.$t('formValidation.materialNameCannotBeEmpty'),
                        trigger: 'blur',
                    },
                ],
                materialNo: [
                    {
                        required: true,
                        message: '物料编号不能为空',
                        trigger: 'blur',
                    },
                ],
                supplierNo: [
                    {
                        required: true,
                        message: '供应商编号不能为空',
                        trigger: 'blur',
                    },
                ],
            },
            fullscreen: false,
        }
    },
    created() {
        this.getList()
        this.getProjectList()
        this.getMaterialType()
        this.getUnitList()
        this.getExtraInfo()
    },
    methods: {
        checkoutTypeCopyFilter(row) {
            const current = this.dict.type.NYIQC_CHECK_TYPE.find((io) => {
                return io.value === row
            })
            return current ? current.label : ''
        },
        changeSampling(e, scope) {
            console.log(scope.$index)
            this.extraList[scope.$index].samplingTwo = null
            this.extraList[scope.$index].samplingThree = null
        },
        changeCheckoutType(e, scope) {
            let data = this.checkoutTypeCopyFilter(e)
            e.includes('boole')
                ? (this.typeList[scope.$index].checkoutType = '布尔型')
                : (this.typeList[scope.$index].checkoutType = '数值')
            this.typeList[scope.$index].checkoutTypeCopy = data
        },
        getExtraInfo() {
            this.loading = true
            getExtraInfo(this.id).then((response) => {
                this.loading = false
                if (response.code == 200 && response.data) {
                    this.viewModel = response.data
                    this.extraList = response.data.checkItemList
                }
            })
        },
        getUnitList() {
            listCheckoutUnit().then((res) => {
                this.unitList = res.rows
            })
        },
        changeProject(e) {
            let obj = this.projectList.find((item) => {
                return item.projectName === e.row.projectName
            })
            this.extraList[e.$index].projectCode = obj.projectCode
            this.extraList[e.$index].projectId = obj.projectId
        },
        getProjectList() {
            listProject().then((res) => {
                this.projectList = res.rows
            })
        },
        getMaterialType() {
            // listALLMaterialType().then((res) => {
            //     this.materialOptions = res.data
            // })
        },
        closeTab() {
            this.$router.push({
                path: '/inventoryManagement/additionalInspection',
            })
        },
        effectDateChange(e, scope) {
            if (parseInt(e) > 0) {
                this.extraList[scope.$index].endDate = this.getNewDay(
                    scope.row.approvalTime,
                    e
                )
            }
        },
        getNewDay(dateTemp, days) {
            var dateTemp = dateTemp.split('-')
            //转换为MM-DD-YYYY格式
            var nDate = new Date(
                dateTemp[1] + '-' + dateTemp[2] + '-' + dateTemp[0]
            )
            var millSeconds = Math.abs(nDate) + days * 24 * 60 * 60 * 1000
            var rDate = new Date(millSeconds)
            var year = rDate.getFullYear()
            var month = rDate.getMonth() + 1
            if (month < 10) month = '0' + month
            var date = rDate.getDate()
            if (date < 10) date = '0' + date
            return year + '-' + month + '-' + date
        },
        fileChange(e) {
            console.log(e)
        },
        drawerClose() {
            this.drawer = false
        },
        /** 查询字典类型列表 */
        getList() {
            this.loading = false
        },
        // 取消按钮
        cancel() {
            this.open = false
            this.reset()
        },
        // 表单重置
        reset() {
            this.form = {
                dictId: undefined,
                dictName: undefined,
                dictType: undefined,
                status: '0',
                remark: undefined,
            }
            this.resetForm('form')
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1
            this.getList()
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.dateRange = []
            this.resetForm('queryForm')
            this.handleQuery()
        },
        /** 新增按钮操作 */
        handleAdd() {
            this.extraList.push({
                samplingOne: null,
                samplingTwo: null,
                samplingThree: null,
                measuringTool: null,
                inspectionType: '1',
                specialCharacteristics: '0',
                projectCode: null,
            })
        },
        // 多选框选中数据
        handleSelectionChange(selection) {
            this.ids = selection.map((item) => item.dictId)
            this.single = selection.length != 1
            this.multiple = !selection.length
        },
        /** 修改按钮操作 */
        handleUpdate(row) {
            this.reset()
            const dictId = row.dictId || this.ids
            getType(dictId).then((response) => {
                this.form = response.data
                this.open = true
                this.title = '修改字典类型'
            })
        },
        /** 提交按钮 */
        submitForm: function () {
            this.$refs['addForm'].validate((valid) => {
                if (valid) {
                    let submitData = {
                        ...this.viewModel,
                        checkItemList: this.extraList,
                    }
                    console.log(JSON.stringify(submitData))
                    submitData.inspectionLotMark =
                        'EW' + submitData.inspectionLotMark
                    submitData.lot = 'EW' + submitData.lot
                    editExtra(submitData).then((response) => {
                        this.$modal.msgSuccess('提交成功!')
                        this.$router.push({
                            path: '/inventoryManagement/additionalInspection',
                        })
                    })
                } else {
                    console.log('error submit!!')
                    return false
                }
            })
        },
        /** 发起检验提交 */
        submitAddForm: function () {
            this.$modal.msgSuccess('发起成功!')
            this.addInspection = false
        },

        /** 删除按钮操作 */
        handleDelete(row) {
            if (this.extraList.length === 1) {
                this.$modal.msgWarning('请至少保留一条检验项!')
                return
            }
            this.extraList.splice(row.$index, 1)
        },
        /** 查看按钮操作 */
        handleView(row) {
            this.form = row
            this.viewInspectionExemption = true
            //   if(row.hasRead == 0){
            //     readNotice(row.noticeId).then(res=>{
            //       if(res.code == 200){
            //         this.handleQuery()
            //       }
            //     })
            //   }
        },
        /** 编辑按钮操作 */
        handleEdit(row) {
            this.drawer = true
        },
        /** 关闭抽屉操作 */
        handleClose(row) {
            this.drawer = false
        },
        /** 导出按钮操作 */
        handleExport() {
            this.download(
                'system/dict/type/export',
                {
                    ...this.queryParams,
                },
                `type_${new Date().getTime()}.xlsx`
            )
        },
        /** 刷新缓存按钮操作 */
        handleRefreshCache() {
            refreshCache().then(() => {
                this.$modal.msgSuccess('刷新成功')
            })
        },
    },
}
</script>
<style lang="scss" scoped>
::v-deep .el-card {
    padding-top: 20px;
    border: 0px;
    box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    padding-bottom: 20px;
}
::v-deep .el-aside {
    padding: 0;
    margin-bottom: 0;
}
.content-style {
    border: 0px;
    box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    background-color: white;
    margin-top: 10px;
}
::v-deep .el-button-group .selBtn {
    background: #fff;
    border: 1px solid #0b7be3;
    color: #0b7be3;
}
::v-deep .el-button-group .unselBtn {
    background: #fff;
    border: 1px solid #ededf2;
    color: #666666;
}
.header-left {
    float: left;
    font-size: 14px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #333333;
    line-height: 40px;
    display: flex;
    justify-content: center;
}
.header-right {
    float: right;
}
.container-header {
    float: left;
    width: 100%;
    border-bottom: 1px solid #ededf2;
    padding-left: 12px;
}
.container-table {
    float: left;
    margin-top: 6px;
    width: 100%;
    // max-height: calc(100vh - 600px);
    overflow: auto;
}
.mb8 {
    float: left;
    margin-top: 6px;
    width: 100%;
}
.drawer-footer {
    display: flex;
    position: relative;
    z-index: 9999;
    bottom: -40px;
    height: 40px;
    justify-content: center;
    width: 100%;
}
.hign-line {
    position: relative;
    left: -8px;
    top: 14px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid #0b7be3;
    float: left;
}
.drawer-close {
    background: #f7f8fa;
    border-color: #f7f8fa;
}
.submit-footer {
    height: 52px;
    background: #ffffff;
    box-shadow: 0px -5px 5px 0px rgba(0, 0, 0, 0.08);
    border-radius: 4px 4px 0px 0px;
    position: fixed;
    z-index: 9;
    bottom: 0px;
    width: 100%;
    left: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.samplingPercent {
    position: absolute;
    z-index: 9;
    right: 20px;
}
::v-deep .el-card {
    padding-top: 0px;
}
.app-detail {
    max-height: calc(100vh - 180px);
    overflow: auto;
}
</style>
